<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: ActiveSupport::Callbacks::Callback</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">ActiveSupport::Callbacks::Callback</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../files/vendor/rails/activesupport/lib/active_support/callbacks_rb.html">
                vendor/rails/activesupport/lib/active_support/callbacks.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="../../Object.html">
                Object
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000369">==</a>&nbsp;&nbsp;
      <a href="#M000373">call</a>&nbsp;&nbsp;
      <a href="#M000371">dup</a>&nbsp;&nbsp;
      <a href="#M000370">eql?</a>&nbsp;&nbsp;
      <a href="#M000372">hash</a>&nbsp;&nbsp;
      <a href="#M000368">new</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">identifier</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">kind</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">method</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">options</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000368" class="method-detail">
        <a name="M000368"></a>

        <div class="method-heading">
          <a href="#M000368" class="method-signature">
          <span class="method-name">new</span><span class="method-args">(kind, method, options = {})</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000368-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000368-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/activesupport/lib/active_support/callbacks.rb, line 133</span>
133:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">kind</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span> = {})
134:         <span class="ruby-ivar">@kind</span>       = <span class="ruby-identifier">kind</span>
135:         <span class="ruby-ivar">@method</span>     = <span class="ruby-identifier">method</span>
136:         <span class="ruby-ivar">@identifier</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:identifier</span>]
137:         <span class="ruby-ivar">@options</span>    = <span class="ruby-identifier">options</span>
138:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000369" class="method-detail">
        <a name="M000369"></a>

        <div class="method-heading">
          <a href="#M000369" class="method-signature">
          <span class="method-name">==</span><span class="method-args">(other)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000369-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000369-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/activesupport/lib/active_support/callbacks.rb, line 140</span>
140:       <span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">other</span>)
141:         <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">other</span>
142:         <span class="ruby-keyword kw">when</span> <span class="ruby-constant">Callback</span>
143:           (<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">identifier</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">identifier</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">identifier</span>) <span class="ruby-operator">||</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">method</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>.<span class="ruby-identifier">method</span>
144:         <span class="ruby-keyword kw">else</span>
145:           (<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">identifier</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">identifier</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>) <span class="ruby-operator">||</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">method</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>
146:         <span class="ruby-keyword kw">end</span>
147:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000373" class="method-detail">
        <a name="M000373"></a>

        <div class="method-heading">
          <a href="#M000373" class="method-signature">
          <span class="method-name">call</span><span class="method-args">(*args, &amp;block)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000373-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000373-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/activesupport/lib/active_support/callbacks.rb, line 165</span>
165:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">call</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
166:         <span class="ruby-identifier">evaluate_method</span>(<span class="ruby-identifier">method</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">should_run_callback?</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
167:       <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">LocalJumpError</span>
168:         <span class="ruby-identifier">raise</span> <span class="ruby-constant">ArgumentError</span>,
169:           <span class="ruby-value str">&quot;Cannot yield from a Proc type filter. The Proc must take two &quot;</span> <span class="ruby-operator">+</span>
170:           <span class="ruby-value str">&quot;arguments and execute #call on the second argument.&quot;</span>
171:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000371" class="method-detail">
        <a name="M000371"></a>

        <div class="method-heading">
          <a href="#M000371" class="method-signature">
          <span class="method-name">dup</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000371-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000371-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/activesupport/lib/active_support/callbacks.rb, line 153</span>
153:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">dup</span>
154:         <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-ivar">@kind</span>, <span class="ruby-ivar">@method</span>, <span class="ruby-ivar">@options</span>.<span class="ruby-identifier">dup</span>)
155:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000370" class="method-detail">
        <a name="M000370"></a>

        <div class="method-heading">
          <a href="#M000370" class="method-signature">
          <span class="method-name">eql?</span><span class="method-args">(other)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000370-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000370-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/activesupport/lib/active_support/callbacks.rb, line 149</span>
149:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">eql?</span>(<span class="ruby-identifier">other</span>)
150:         <span class="ruby-keyword kw">self</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">other</span>
151:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000372" class="method-detail">
        <a name="M000372"></a>

        <div class="method-heading">
          <a href="#M000372" class="method-signature">
          <span class="method-name">hash</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000372-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000372-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/activesupport/lib/active_support/callbacks.rb, line 157</span>
157:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hash</span>
158:         <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@identifier</span>
159:           <span class="ruby-ivar">@identifier</span>.<span class="ruby-identifier">hash</span>
160:         <span class="ruby-keyword kw">else</span>
161:           <span class="ruby-ivar">@method</span>.<span class="ruby-identifier">hash</span>
162:         <span class="ruby-keyword kw">end</span>
163:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>